/// <reference path="Enumerations\BindingType.ts" />

declare module Microsoft.Office.WebExtension {

    /** An abstract class that represents a binding to a section of the document. */
    export class Binding {

        /** Get the Document object associated with the binding. */
        document: Document;

        /** Gets the identifier of the object. */
        id: string;

        /** Gets the type of the binding. */
        type: BindingType;

        /** Adds a handler to the binding for the specified event type. */
        addHandlerAsync(eventType: EventType, handler: any, options?: { asyncContext?: any; }, callback?: (result: AsyncResult) => void): void;

        /** Returns the data contained within the binding. */
        getDataAsync(options?: { coercionType?: CoercionType; valueFormat?: ValueFormat; filterType?: FilterType; startRow: number; startColumn: number; rowCount: number; columnCount: number; asyncContext?: any; }, callback?: (result: AsyncResult) => void): void;

        /** Removes the specified handler from the binding for the specified event type. */
        removeHandlerAsync(eventType: EventType, options?: { handler?: any; asyncContext?: any; }, callback?: (result: AsyncResult) => void): void;

        /** Writes data to the bound section of the document represented by the specified binding object. */
        setDataAsync(options?: { coercionType?: CoercionType; startRow: number; startColumn: number; asyncContext?: any; }, callback?: (result: AsyncResult) => void): void;

    }
}